<template>
  <div class="rules-content">
    <ul class="mui-table-view mui-table-view-chevron clause" >
      <li class="mui-table-view-cell" style=""> 
        <a class="mui-navigate-right  mui-checkbox  mui-input-row mui-left">
          <input name="checkbox" checked="checked" value="bidding" type="checkbox" @change="handerRulesCheckStatus">    
          <span @tap="switchRulesStatus">我已同意《{{rulesData.name}}规则》</span>
        </a>
     
        <div class="rules" v-show="rulesStatus" v-html="rulesData.rule">
            {{rulesData.rule}}
        </div>
      </li>
      <!-- <li class="mui-table-view-cell" style=""> 
        <a class="mui-navigate-right  mui-checkbox  mui-input-row mui-left">
          <input name="checkbox" value="clause" type="checkbox">    
          <span @tap="switchClauseTextStatus">我已同意《法律条款》</span>
        </a>
      </li> -->
    </ul>
    <!-- <div class="clauseText" v-show="clauseTextStatus" v-html="rulesData.clause">
        {{rulesData.clause}}
    </div> -->
  </div>
</template>
<script>
	import mui from 'static/js/mui'
  export default {
    data() {
      return {
          topStatus: false,
          rulesStatus: false,
          clauseTextStatus: false,
          
        }
    },
    props: {
      rulesData: {
        type: Object
      }
    },
    watch: {
    },
    components:{
    },
    methods: {
      handerRulesCheckStatus(event) {
        //console.log(event.target.checked)
        this.$emit('switchRulesCheckStatus', event.target.checked)
      },
      goTop() {
        //兼容性写法
        mui('.mui-scroll-wrapper').scroll().scrollTo(0,0,0);
        this.topStatus = false;
      },
      switchClauseTextStatus() {
        this.clauseTextStatus = !this.clauseTextStatus
      }, 
      switchRulesStatus() {
        this.rulesStatus = !this.rulesStatus
      }
    },
    created() {
    },
    destroyed () { 

    },
    mounted () {
    },
  };

</script>
<style lang="scss" scoped>
  .mui-checkbox input[type="checkbox"] {
    position: absolute;
    top: 4px;
    right: 20px;
    display: inline-block;
    width: 28px;
    height: 26px;
    border: 0;
    outline: 0 !important;
    background-color: transparent;
    -webkit-appearance: none;
    margin-top: 7px;
  }

  .mui-checkbox input[type="checkbox"]:before {
    font-family: Muiicons;
    font-size: 28px;
    font-weight: normal;
    line-height: 1;
    text-decoration: none;
    color: #aaa;
    border-radius: 0;
    background: none;
    -webkit-font-smoothing: antialiased;
  }
  .mui-checkbox input[type="checkbox"]:checked:before {
    content: "\e442";
  }

  .mui-checkbox input[type="checkbox"]:checked:before {
    color: #ff6a27;
  }

  .mui-checkbox input[type="checkbox"]:before {
    font-family: Muiicons;
    font-size: 28px;
    font-weight: normal;
    line-height: 1;
    text-decoration: none;
    color: #aaa;
    border-radius: 0;
    background: none;
    -webkit-font-smoothing: antialiased;
  }

  .mui-checkbox span {
    height: 26px;
    line-height: 25px;
    position: relative;
    font-size:14px!important;
    top: 2px;
    left: 34px;
    width: 110%;
    display: inline-block;
    padding-top: 2px;
    z-index: 99;
  }

  .mui-radio.mui-left input[type="radio"],
  .mui-checkbox.mui-left input[type="checkbox"] {
    left: 14px;
  }
  .mui-navigate-right:after,
  .mui-push-left:after,
  .mui-push-right:after {
    top: 35% !important;
  }
  .mui-navigate-right:after {
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
    font-size: 0.9rem;
  }
 /* 规则 */
  .rules{
      background: #fff;
      width: 112%;
      padding-top:10px;
  }
  .rules p{
      font-size:12px;
      padding-left:0px;
      padding-bottom:10px;
      padding-top:10px;
      margin-bottom:0px;
      text-align: justify;
  }
  /* 条款 */
  .clauseText{
      background: #fff;
  }
  .clauseText p{
      font-size:12px;
      padding:20px;
      padding-bottom:10px;
      padding-top:10px;
      margin-bottom:0px;
  }
</style>